This file with additional information is published using the packages rmarkdown (Allaire et al. 2020) and bookdown (Xie 2020)

For the analysis, the packages nlme (Pinheiro et al. 2021) and multilevel (Bliese 2016) were used. For the creation of tables and plot, the package sjPlot (Lüdecke 2021) was used

1 Clearing memory and loading packages for analyses

rm(list = ls())     # remove all variables, clean memory
curWD <- dirname(rstudioapi::getSourceEditorContext()$path) #Get the directory of current script
setwd(curWD)

#required packages (install them first = install.packages(name of the package))
#if (!require(nlme)) {install.packages("nlme",repos = "http://cran.us.r-project.org"); require(nlme)}
#if (!require(lme4)) {install.packages("lme4",repos = "http://cran.us.r-project.org"); require(lme4)}
#if (!require(multilevel)) {install.packages("multilevel",repos = "http://cran.us.r-project.org"); require(multilevel)}
#if (!require(lattice)) {install.packages("lattice",repos = "http://cran.us.r-project.org"); require(lattice)}

if (!require(sjPlot)) {install.packages("sjPlot",repos = "http://cran.us.r-project.org"); require(sjPlot)}
#if (!require(glmmTMB)) {install.packages("glmmTMB",repos = "http://cran.us.r-project.org"); require(glmmTMB)}

library("nlme") 
library("multilevel")
library("lattice")
library("Hmisc")

tested other specifications for TeacherExperience, lineair significant rest not and when added lineair not significant either

casedata <- haven::read_spss("Data_International_ICALT_Observation_Differentiation_ML_2021.sav")  
#the short version data

#indicate variables to be factors instead of interval 
casedata$TeacherSubjectCode <-factor(casedata$TeacherSubjectCode, levels = c(1,2,3), 
                                     labels = c("alpha", "beta", "gamma"))
casedata$SchoolNum <- factor(casedata$SchoolNum) 
casedata$ObserverNum <- factor(casedata$ObserverNum)
casedata$CntrNr <- factor(casedata$CntrNr, levels = c(1,2,3,4,5,6),
                   labels = c("Indonesia", "Mongolia", "Pakistan", "South Korea", "Spain", "the Netherlands"))
casedata$TeacherGender <-factor (casedata$TeacherGender, levels =c(1,2), labels = c("male", "female"))
casedata$ObserverGender <-factor (casedata$ObserverGender, levels =c(1,2), labels = c("male", "female"))

#change reference catagory to match SPSS analysis, in order to directly compare parameter esitmates 
#from the models 
casedata$TeacherGender <- relevel(casedata$TeacherGender, ref= 2)
casedata$ObserverGender <- relevel(casedata$ObserverGender, ref= 2)
casedata$CntrNr <- relevel(casedata$CntrNr, ref = 6)
casedata$TeacherSubjectCode <-relevel(casedata$TeacherSubjectCode, ref= 3)

casedata$Ana1 <- factor(casedata$Ana1)
casedata$Ana2 <- factor(casedata$Ana2)
casedata$Ana3 <- factor(casedata$Ana3)
casedata$Ana4 <- factor(casedata$Ana4)


label(casedata$CntrNr) <- "Country" 
label(casedata$iCalt_Management) <- "TB Management" 
label(casedata$iCalt_Stimulerend) <- "TB Climate" 
label(casedata$iCalt_Instructie) <- "TB Instruction"
label(casedata$iCalt_Activerend) <- "TB Activation"
label(casedata$iCalt_Metacognitie) <- "TB Learning Strategies"
label(casedata$iCalt_Dfferentiatie) <-  "TB Differentation" 

Selecting data for subselections 1 to 3 for model 5 and model 9

casedata_A <- subset(casedata, subset = IncCase == 1)
casedata_B <- subset(casedata, subset = IncCase2 == 1)
casedata_C <- subset(casedata, subset = IncCase3 == 1)


casedata_A2 <- subset(casedata_A, subset= Ana2 == 1)
casedata_B2 <- subset(casedata_B, subset= Ana2 == 1)
casedata_C2 <- subset(casedata_C, subset= Ana2 == 1)
casedata_Tot <- subset(casedata, subset= Ana2 == 1)

casedata_A4 <- subset(casedata_A, subset= Ana4 == 1)
casedata_B4 <- subset(casedata_B, subset= Ana4 == 1)
casedata_C4 <- subset(casedata_C, subset= Ana4 == 1)
casedata_Tot4 <- subset(casedata, subset= Ana4 == 1)

2 analysis model 5

Sample_A_Ana2_M5.ML <- lme( iCalt_Dfferentiatie~TeacherGender + TeacherExperience+ TeacherSubjectCode + 
                     iCalt_Management+iCalt_Stimulerend+iCalt_Instructie+iCalt_Activerend+
                     iCalt_Metacognitie + NumberOfStudents + CntrNr , 
                   random = ~ 1 | SchoolNum, casedata_A2, control = list(opt = "optim"), 
                   method = "ML" , na.action=na.omit)

Sample_B_Ana2_M5.ML <- lme( iCalt_Dfferentiatie~TeacherGender + TeacherExperience+ TeacherSubjectCode + 
                              iCalt_Management+iCalt_Stimulerend+iCalt_Instructie+iCalt_Activerend+
                              iCalt_Metacognitie + NumberOfStudents + CntrNr , 
                            random = ~ 1 | SchoolNum, casedata_B2, control = list(opt = "optim"), 
                            method = "ML" , na.action=na.omit) 

Sample_C_Ana2_M5.ML <- lme( iCalt_Dfferentiatie~TeacherGender + TeacherExperience+ TeacherSubjectCode + 
                              iCalt_Management+iCalt_Stimulerend+iCalt_Instructie+iCalt_Activerend+
                              iCalt_Metacognitie + NumberOfStudents + CntrNr , 
                            random = ~ 1 | SchoolNum, casedata_C2, control = list(opt = "optim"), 
                            method = "ML" , na.action=na.omit) 

Sample_Tot_Ana2_M5.ML <- lme( iCalt_Dfferentiatie~TeacherGender + TeacherExperience+ TeacherSubjectCode + 
                              iCalt_Management+iCalt_Stimulerend+iCalt_Instructie+iCalt_Activerend+
                              iCalt_Metacognitie + NumberOfStudents + CntrNr , 
                            random = ~ 1 | SchoolNum, casedata_Tot, control = list(opt = "optim"), 
                            method = "ML" , na.action=na.omit) 

#different plot models for fixed effects model Analysis 2, Model 5

#plot of models 5 for fixed effects model Analysis 2

plot_models(Sample_Tot_Ana2_M5.ML, Sample_C_Ana2_M5.ML, Sample_B_Ana2_M5.ML, Sample_A_Ana2_M5.ML, 
            grid = TRUE, legend.title = "Models", 
            show.values =TRUE, value.size = 5, m.labels = c("No Sample", "Sample C", "Sample B", "Sample A"))

tab_model(Sample_A_Ana2_M5.ML, Sample_B_Ana2_M5.ML, Sample_C_Ana2_M5.ML, Sample_Tot_Ana2_M5.ML,  
          show.ci = FALSE, show.se = TRUE,  dv.labels = c("Sample A", "Sample B", "Sample C", "No Sample"))
  Sample A Sample B Sample C No Sample
Predictors Estimates std. Error p Estimates std. Error p Estimates std. Error p Estimates std. Error p
(Intercept) -0.04 0.09 0.631 0.08 0.09 0.351 -0.01 0.09 0.884 0.13 0.06 0.029
TeacherGender: male -0.05 0.02 0.056 -0.03 0.02 0.282 -0.02 0.02 0.397 -0.02 0.02 0.329
teacher: years of
experience
0.00 0.00 0.840 -0.00 0.00 0.652 -0.00 0.00 0.950 0.00 0.00 0.010
TeacherSubjectCode: alpha -0.00 0.03 0.997 -0.01 0.03 0.680 0.01 0.03 0.625 0.04 0.02 0.049
TeacherSubjectCode: beta 0.01 0.03 0.784 0.01 0.03 0.628 0.02 0.03 0.529 0.07 0.02 <0.001
TB Management 0.08 0.03 0.002 0.07 0.03 0.009 0.09 0.03 0.002 0.12 0.02 <0.001
TB Climate 0.02 0.03 0.525 -0.01 0.03 0.624 -0.01 0.03 0.688 -0.01 0.02 0.754
TB Instruction 0.04 0.04 0.246 0.07 0.04 0.072 0.05 0.04 0.148 -0.03 0.02 0.151
TB Activation 0.36 0.03 <0.001 0.33 0.03 <0.001 0.34 0.03 <0.001 0.36 0.02 <0.001
TB Learning Strategies 0.29 0.03 <0.001 0.33 0.03 <0.001 0.32 0.03 <0.001 0.28 0.02 <0.001
students: number in class -0.00 0.00 0.530 -0.00 0.00 0.161 -0.00 0.00 0.186 -0.00 0.00 0.007
Country: Indonesia 0.01 0.07 0.922 -0.02 0.07 0.724 0.01 0.07 0.877 -0.01 0.05 0.849
Country: Mongolia 0.14 0.06 0.015 0.11 0.06 0.082 0.14 0.06 0.022 0.13 0.05 0.004
Country: Pakistan 0.52 0.08 <0.001 0.47 0.09 <0.001 0.52 0.09 <0.001 0.49 0.07 <0.001
Country: South Korea 0.32 0.06 <0.001 0.26 0.06 <0.001 0.27 0.06 <0.001 0.31 0.04 <0.001
Country: Spain 0.03 0.08 0.744 -0.00 0.08 0.953 0.02 0.08 0.819 -0.04 0.07 0.562
Random Effects
σ2 0.14 0.14 0.14 0.20
τ00 0.07 SchoolNum 0.08 SchoolNum 0.08 SchoolNum 0.05 SchoolNum
ICC 0.33 0.34 0.35 0.19
N 376 SchoolNum 378 SchoolNum 361 SchoolNum 699 SchoolNum
Observations 1822 1868 1719 4643
Marginal R2 / Conditional R2 0.542 / 0.694 0.529 / 0.691 0.531 / 0.696 0.489 / 0.588

#Additional models: interactions #interaction models country by … Gender, TeacherSubjectCode, TeacherExperience, NumberOfStudent, TQ Management

Sample_A_Ana2_M9I1.ML <- lme( iCalt_Dfferentiatie~TeacherGender + TeacherExperience+ TeacherSubjectCode + 
                       iCalt_Management+iCalt_Stimulerend+iCalt_Instructie+iCalt_Activerend+
                       iCalt_Metacognitie + NumberOfStudents + CntrNr + 
                       CntrNr * TeacherGender + CntrNr * TeacherExperience + CntrNr * TeacherSubjectCode + 
                       CntrNr * NumberOfStudents + CntrNr * iCalt_Management   , 
                     random = ~ 1 | SchoolNum, casedata_A2, control = list(opt = "optim"), 
                     method = "ML" , na.action=na.omit)

Sample_B_Ana2_M9I1.ML <- lme( iCalt_Dfferentiatie~TeacherGender + TeacherExperience+ TeacherSubjectCode + 
                                iCalt_Management+iCalt_Stimulerend+iCalt_Instructie+iCalt_Activerend+
                                iCalt_Metacognitie + NumberOfStudents + CntrNr + 
                                CntrNr * TeacherGender + CntrNr * TeacherExperience + CntrNr * TeacherSubjectCode + 
                                CntrNr * NumberOfStudents + CntrNr * iCalt_Management   , 
                              random = ~ 1 | SchoolNum, casedata_B2, control = list(opt = "optim"), 
                              method = "ML" , na.action=na.omit)

Sample_C_Ana2_M9I1.ML <- lme( iCalt_Dfferentiatie~TeacherGender + TeacherExperience+ TeacherSubjectCode + 
                                iCalt_Management+iCalt_Stimulerend+iCalt_Instructie+iCalt_Activerend+
                                iCalt_Metacognitie + NumberOfStudents + CntrNr + 
                                CntrNr * TeacherGender + CntrNr * TeacherExperience + CntrNr * TeacherSubjectCode + 
                                CntrNr * NumberOfStudents + CntrNr * iCalt_Management   , 
                              random = ~ 1 | SchoolNum, casedata_C2, control = list(opt = "optim"), 
                              method = "ML" , na.action=na.omit)

Sample_Tot_Ana2_M9I1.ML <- lme( iCalt_Dfferentiatie~TeacherGender + TeacherExperience+ TeacherSubjectCode + 
                                iCalt_Management+iCalt_Stimulerend+iCalt_Instructie+iCalt_Activerend+
                                iCalt_Metacognitie + NumberOfStudents + CntrNr + 
                                CntrNr * TeacherGender + CntrNr * TeacherExperience + CntrNr * TeacherSubjectCode + 
                                CntrNr * NumberOfStudents + CntrNr * iCalt_Management   , 
                              random = ~ 1 | SchoolNum, casedata_Tot, control = list(opt = "optim"), 
                              method = "ML" , na.action=na.omit)

#plot of models 1-5 for fixed effects model Analysis 2

plot_models(Sample_Tot_Ana2_M9I1.ML, Sample_C_Ana2_M9I1.ML, Sample_B_Ana2_M9I1.ML, Sample_A_Ana2_M9I1.ML, 
            grid = TRUE, legend.title = "Models", 
            show.values =TRUE, value.size = 3, m.labels = c("No Sample", "Sample C", "Sample B", "Sample A"))

tab_model(Sample_A_Ana2_M9I1.ML, Sample_B_Ana2_M9I1.ML, Sample_C_Ana2_M9I1.ML, Sample_Tot_Ana2_M9I1.ML,  
          show.ci = FALSE, show.se = TRUE,  dv.labels = c("Sample A", "Sample B", "Sample C", "No Sample"))
  Sample A Sample B Sample C No Sample
Predictors Estimates std. Error p Estimates std. Error p Estimates std. Error p Estimates std. Error p
(Intercept) -0.10 0.20 0.610 0.23 0.21 0.269 -0.10 0.22 0.640 0.19 0.08 0.015
TeacherGender: male -0.06 0.06 0.328 0.05 0.06 0.426 0.10 0.06 0.095 -0.02 0.02 0.361
teacher: years of
experience
0.01 0.00 0.031 -0.01 0.01 0.291 -0.00 0.00 0.541 0.00 0.00 0.006
TeacherSubjectCode: alpha -0.03 0.07 0.718 0.07 0.08 0.375 0.11 0.07 0.120 0.06 0.02 0.010
TeacherSubjectCode: beta -0.08 0.07 0.277 0.11 0.07 0.147 0.13 0.07 0.091 0.12 0.02 <0.001
TB Management 0.09 0.05 0.077 0.05 0.06 0.367 0.14 0.05 0.009 0.11 0.02 <0.001
TB Climate 0.02 0.03 0.407 -0.01 0.03 0.837 0.00 0.03 0.961 -0.00 0.02 0.872
TB Instruction 0.03 0.04 0.369 0.06 0.04 0.131 0.04 0.04 0.327 -0.04 0.02 0.136
TB Activation 0.36 0.03 <0.001 0.33 0.03 <0.001 0.34 0.03 <0.001 0.37 0.02 <0.001
TB Learning Strategies 0.29 0.03 <0.001 0.33 0.03 <0.001 0.32 0.03 <0.001 0.27 0.02 <0.001
students: number in class 0.00 0.01 0.641 -0.01 0.01 0.071 -0.01 0.01 0.055 -0.00 0.00 0.014
Country: Indonesia 0.28 0.25 0.267 -0.05 0.26 0.844 0.29 0.26 0.272 0.13 0.18 0.483
Country: Mongolia 0.22 0.26 0.387 -0.11 0.26 0.665 0.22 0.27 0.403 0.06 0.19 0.752
Country: Pakistan 0.37 0.26 0.156 0.07 0.26 0.797 0.40 0.27 0.139 0.16 0.19 0.404
Country: South Korea 0.07 0.30 0.820 0.20 0.29 0.487 0.32 0.35 0.357 0.15 0.17 0.359
Country: Spain 0.22 0.34 0.515 -0.09 0.35 0.787 0.24 0.35 0.494 0.13 0.33 0.700
TeacherGendermale:CntrNrIndonesia 0.04 0.07 0.554 -0.06 0.07 0.408 -0.12 0.07 0.116 0.00 0.05 0.974
TeacherGendermale:CntrNrMongolia -0.11 0.08 0.209 -0.21 0.09 0.015 -0.27 0.09 0.002 -0.14 0.07 0.064
TeacherGendermale:CntrNrPakistan 0.11 0.14 0.402 0.01 0.14 0.968 -0.05 0.14 0.723 0.09 0.11 0.422
TeacherGendermale:CntrNrSouth Korea 0.11 0.08 0.181 -0.03 0.08 0.675 -0.07 0.09 0.453 0.06 0.04 0.143
TeacherGendermale:CntrNrSpain -0.05 0.10 0.664 -0.15 0.11 0.147 -0.21 0.11 0.045 -0.06 0.10 0.548
TeacherExperience:CntrNrIndonesia -0.01 0.00 0.038 0.00 0.01 0.417 0.00 0.01 0.706 -0.01 0.00 0.057
TeacherExperience:CntrNrMongolia -0.01 0.00 0.040 0.00 0.01 0.471 0.00 0.01 0.753 -0.01 0.00 0.111
TeacherExperience:CntrNrPakistan -0.01 0.01 0.256 0.01 0.01 0.422 0.00 0.01 0.616 -0.00 0.01 0.666
TeacherExperience:CntrNrSouth Korea -0.01 0.00 0.286 0.01 0.01 0.100 0.01 0.01 0.043 0.00 0.00 0.927
TeacherExperience:CntrNrSpain -0.02 0.01 <0.001 -0.01 0.01 0.280 -0.01 0.01 0.123 -0.02 0.01 0.002
TeacherSubjectCodealpha:CntrNrIndonesia 0.01 0.09 0.951 -0.09 0.09 0.350 -0.13 0.09 0.139 -0.08 0.07 0.199
TeacherSubjectCodebeta:CntrNrIndonesia 0.05 0.08 0.549 -0.13 0.08 0.113 -0.15 0.09 0.073 -0.15 0.06 0.006
TeacherSubjectCodealpha:CntrNrMongolia 0.03 0.09 0.729 -0.06 0.10 0.538 -0.11 0.10 0.265 -0.07 0.08 0.365
TeacherSubjectCodebeta:CntrNrMongolia 0.05 0.09 0.564 -0.13 0.09 0.146 -0.15 0.09 0.097 -0.16 0.07 0.026
TeacherSubjectCodealpha:CntrNrPakistan 0.00 0.10 0.986 -0.09 0.11 0.376 -0.14 0.10 0.177 -0.08 0.09 0.354
TeacherSubjectCodebeta:CntrNrPakistan 0.11 0.10 0.279 -0.08 0.10 0.451 -0.10 0.10 0.358 -0.09 0.09 0.345
TeacherSubjectCodealpha:CntrNrSouth Korea 0.09 0.10 0.375 -0.14 0.10 0.161 -0.07 0.11 0.542 -0.05 0.05 0.295
TeacherSubjectCodebeta:CntrNrSouth Korea 0.15 0.10 0.128 -0.12 0.10 0.196 -0.17 0.11 0.128 -0.11 0.05 0.032
TeacherSubjectCodealpha:CntrNrSpain 0.18 0.13 0.177 0.09 0.13 0.479 0.05 0.13 0.701 0.04 0.13 0.739
TeacherSubjectCodebeta:CntrNrSpain 0.28 0.13 0.036 0.07 0.13 0.575 0.06 0.13 0.643 0.07 0.13 0.563
NumberOfStudents:CntrNrIndonesia -0.00 0.01 0.764 0.01 0.01 0.137 0.01 0.01 0.113 0.00 0.00 0.331
NumberOfStudents:CntrNrMongolia -0.00 0.01 0.656 0.01 0.01 0.105 0.01 0.01 0.079 0.00 0.00 0.420
NumberOfStudents:CntrNrPakistan -0.00 0.01 0.537 0.01 0.01 0.126 0.01 0.01 0.097 0.00 0.00 0.202
NumberOfStudents:CntrNrSouth Korea -0.00 0.01 0.765 0.00 0.01 0.881 0.01 0.01 0.440 -0.00 0.00 0.872
NumberOfStudents:CntrNrSpain -0.00 0.01 0.566 0.01 0.01 0.393 0.01 0.01 0.340 -0.00 0.01 0.989
iCalt_Management:CntrNrIndonesia -0.08 0.06 0.153 -0.04 0.06 0.470 -0.13 0.06 0.032 -0.04 0.04 0.316
iCalt_Management:CntrNrMongolia 0.00 0.06 0.942 0.04 0.07 0.559 -0.05 0.07 0.513 0.05 0.06 0.335
iCalt_Management:CntrNrPakistan 0.08 0.07 0.213 0.11 0.07 0.122 0.03 0.07 0.711 0.12 0.06 0.037
iCalt_Management:CntrNrSouth Korea 0.05 0.07 0.434 0.04 0.07 0.572 -0.05 0.08 0.528 0.07 0.04 0.069
iCalt_Management:CntrNrSpain 0.01 0.08 0.897 0.05 0.08 0.578 -0.04 0.08 0.656 0.03 0.08 0.680
Random Effects
σ2 0.14 0.14 0.13 0.20
τ00 0.07 SchoolNum 0.08 SchoolNum 0.08 SchoolNum 0.05 SchoolNum
ICC 0.34 0.35 0.37 0.19
N 376 SchoolNum 378 SchoolNum 361 SchoolNum 699 SchoolNum
Observations 1822 1868 1719 4643
Marginal R2 / Conditional R2 0.553 / 0.705 0.539 / 0.701 0.541 / 0.711 0.498 / 0.594
Allaire, J. J., Y. Xie, J. McPherson, J. Luraschi, K. Ushey, A. Atkins, H. Wickham, J. Cheng, W. Chang, and R. Iannone. 2020. Rmarkdown: Dynamic Documents for r (r Package Version 2.6). https://github.com/rstudio/rmarkdown.
Bliese, P. 2016. “Multilevel Modeling in R (2.6): A Brief Introduction to R, the Multilevel Package and the Nlme Package.” https://CRAN.R-project.org/package=multilevel.
Lüdecke, D. 2021. sjPlot: Data Visualization for Statistics in Social Science.” https://cran.r-project.org/web/packages/sjPlot.
Pinheiro, J., D. Bates, S. DebRoy, and D. Sarkar. 2021. “Nlme: Linear and Nonlinear Mixed Effects Models.” https://CRAN.R-project.org/package=nlme.
Xie, Y. 2020. Bookdown: Authoring Books and Technical Documents with r Markdown (r Package Version 0.21). https://github.com/rstudio/bookdown.